package com.mdinfo.gw.door.service

import com.mdinfo.base.common.bean.CommonResult
import com.mdinfo.base.common.bean.DataGrid
import com.mdinfo.gw.door.param.*
import com.mdinfo.gw.door.vo.*

/**
 * Created by Administrator on 2018/1/16.
 */
interface IDoorCardService {

    /**添加门卡*/
    fun add(param: DoorCardAddParam): CommonResult<Void>

    /**列表查询*/
    fun listQuery(param: DoorCardListQueryParam)
            : CommonResult<DataGrid<DoorCardListQueryVo>>

    /**修改门卡*/
    fun modify(param: DoorCardModifyParam): CommonResult<Void>

    /**查询本部门没有绑定卡的人员*/
    fun listUnBindEmp(): CommonResult<List<DoorCardListUnBindEmpVo>>

    /**门卡绑定人员*/
    fun bindEmp(param: DoorCardBindEmpParam): CommonResult<Void>

    /**门卡解绑员工*/
    fun unBindEmp(param: DoorCardUnBindEmpParam): CommonResult<Void>

    /**门卡绑定门*/
    fun bindDoor(param: DoorCardBindDoorParam): CommonResult<Void>

    /**删除门的绑定*/
    fun unBindDoor(param: DoorCardUnBindDoorParam): CommonResult<Void>

    /**删除门卡*/
    fun toDel(param: DoorCardToDelParam): CommonResult<Void>

    /**获取本部门所有的卡*/
    fun listAll(): CommonResult<List<DoorCardListCardVo>>

    /**批量绑定*/
    fun batchBind(param: DoorCardBatchBindParam): CommonResult<Void>

    /**绑定列表*/
    fun listBindTable(param: DoorCardListBindTableParam)
            : CommonResult<DataGrid<DoorCardListBindTableVo>>

    /**批量删除*/
    fun batchUnBind(param: DoorCardBatchUnBindParam): CommonResult<Void>

    /**根据门id分页查询门卡列表*/
    fun listByDoorId(param: DoorCardListByDoorIdParam): CommonResult<DataGrid<DoorCardListByDoorIdVo>>

    /**根据开放时间id查询绑定的门卡*/
    fun listByTimeId(param: DoorCardListByTimeIdParam): CommonResult<DataGrid<DoorCardListByTimeIdVo>>

}